<h1>{attribute_view_gui attribute=$node.data_map.title}</h1>
{attribute_view_gui attribute=$node.data_map.text}

{include name=Validation uri='design:content/collectedinfo_validation.tpl'
	class='warning'
	validation=$validation 
	collection_attributes=$collection_attributes}
	{def $validator = array()}
	{if $validation.attributes|count|gt(0)}
		{foreach $validation.attributes as $att}
			{set $validator = hash($att.identifier, $att)|merge($validator)}
		{/foreach}
	{/if}
<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
<input type="hidden" name="ViewMode" value="full" />
<div class="mdt">Fields marked <span class="req">*</span> are mandatory</div>
<h2 class="mdt-head">Norseman Xtreme Triathlon application</h2>
<fieldset>
	<div class="input input-l {if is_set($validator.read_manual)}input-error{/if}">
		<label>{$node.data_map.read_manual.contentclass_attribute.name|wash}</label>
		{attribute_view_gui attribute=$node.data_map.read_manual}
		<span><span class="req">*</span> {$node.data_map.read_manual.contentclass_attribute.description|wash}</span>
		{if is_set($validator.read_manual)}<span class="error">{$validator.read_manual.description}</span>{/if}
	</div>
	<div class="mdt-box-alt">
		<div class="input input-l {if is_set($validator.race_day)}input-error{/if}">
			<label>{$node.data_map.race_day.contentclass_attribute.name|wash}</label>
			{attribute_view_gui attribute=$node.data_map.race_day}
			<span><span class="req">*</span> {$node.data_map.race_day.contentclass_attribute.description|wash}</span>
			{if is_set($validator.race_day)}<span class="error">{$validator.race_day.description}</span>{/if}
		</div>
	</div>
	<div class="input input-l">
		<label>{$node.data_map.alt_race_day.contentclass_attribute.name|wash}</label>
		{attribute_view_gui attribute=$node.data_map.alt_race_day}
		<span>{$node.data_map.alt_race_day.contentclass_attribute.description|wash}</span>
	</div>
</fieldset>
<h2 class="mdt-head">Personal information</h2>
<fieldset class="mdt-box">
	<div class="holder">
		<fieldset class="box-l">
			<legend>Contact information</legend>
			<div class="input req {if is_set($validator.first_name)}input-error{/if}">
				<label>{$node.data_map.first_name.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.first_name}
				{if is_set($validator.first_name)}<span class="error">{$validator.first_name.description}</span>{/if}
			</div>
			<div class="input req {if is_set($validator.last_name)}input-error{/if}">
				<label>{$node.data_map.last_name.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.last_name}
				{if is_set($validator.last_name)}<span class="error">{$validator.last_name.description}</span>{/if}
			</div>
			<div class="input req {if is_set($validator.email)}input-error{/if}">
				<label>{$node.data_map.email.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.email}
				{if is_set($validator.email)}<span class="error">{$validator.email.description}</span>{/if}
				<p>{$node.data_map.email.contentclass_attribute.description|wash}</p>
				
			</div>
			<div class="input req {if is_set($validator.adddress)}input-error{/if}">
				<label>{$node.data_map.adddress.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.adddress}
				{if is_set($validator.adddress)}<span class="error">{$validator.adddress.description}</span>{/if}
			</div>
			<div class="input input-zip req {if is_set($validator.zip)}input-error{/if}">
				<label>{$node.data_map.zip.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.zip}
				{if is_set($validator.zip)}<span class="error">{$validator.zip.description}</span>{/if}
			</div>
			<div class="input input-place req {if is_set($validator.city)}input-error{/if}">
				<label>{$node.data_map.city.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.city}
				{if is_set($validator.city)}<span class="error">{$validator.city.description}</span>{/if}
			</div>
			<div class="input {if is_set($validator.country)}input-error{/if}">
				<label>{$node.data_map.country.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.country}
				<span class="req">*</span>
				{if is_set($validator.country)}<span class="error">{$validator.country.description}</span>{/if}
			</div>
			<div class="input req {if is_set($validator.phone)}input-error{/if}">
				<label>{$node.data_map.phone.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.phone}
				{if is_set($validator.phone)}<span class="error">{$validator.phone.description}</span>{/if}
				<p>{$node.data_map.phone.contentclass_attribute.description|wash}</p>
				
			</div>
			<div class="input req {if is_set($validator.sex)}input-error{/if}">
				<label>{$node.data_map.sex.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.sex} <span class="req">*</span>
				{if is_set($validator.sex)}<span class="error">{$validator.sex.description}</span>{/if}
			</div>
			<div class="input input-date req {if is_set($validator.birth_date)}input-error{/if}">
				<label>{$node.data_map.birth_date.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.birth_date} <span class="req">*</span>
				{if is_set($validator.birth_date)}<span class="error">{$validator.birth_date.description}</span>{/if}
			</div>
			<div class="input {if is_set($validator.citizenship)}input-error{/if}">
				<label>{$node.data_map.citizenship.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.citizenship}
				<span class="req">*</span>
				{if is_set($validator.citizenship)}<span class="error">{$validator.citizenship.description}</span>{/if}
				<p> {$node.data_map.citizenship.contentclass_attribute.description|wash}</p>
			</div>
		</fieldset>
		<fieldset class="box-r">
			<legend>Athletic information</legend>
			<div class="input {if is_set($validator.tshirt_size)}input-error{/if}">
				<label>{$node.data_map.tshirt_size.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.tshirt_size}
				<span class="req">*</span>
				{if is_set($validator.tshirt_size)}<span class="error">{$validator.tshirt_size.description}</span>{/if}
			</div>
			<div class="input {if is_set($validator.website)}input-error{/if}">
				<label>{$node.data_map.website.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.website}
				{if is_set($validator.website)}<span class="error">{$validator.website.description}</span>{/if}
				<p>{$node.data_map.website.contentclass_attribute.description|wash}</p>
			</div>
			<div class="input {if is_set($validator.team)}input-error{/if}">
				<label>{$node.data_map.team.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.team}
				{if is_set($validator.team)}<span class="error">{$validator.team.description}</span>{/if}
			</div>
			<div class="input {if is_set($validator.participations)}input-error{/if}">
				<label>{$node.data_map.participations.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.participations}
				<span class="req">*</span>
				{if is_set($validator.participations)}<span class="error">{$validator.participations.description}</span>{/if}
				<p>{$node.data_map.participations.contentclass_attribute.description|wash}</p>
			</div>
			<div class="input {if is_set($validator.media_interest)}input-error{/if}">
				<label>{$node.data_map.media_interest.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.media_interest}
				{if is_set($validator.media_interest)}<span class="error">{$validator.media_interest.description}</span>{/if}
				<p>{$node.data_map.media_interest.contentclass_attribute.description|wash}</p>
			</div>
		</fieldset>
	</div>
</fieldset>
<h2 class="mdt-head">Category Elite</h2>
<fieldset class="mdt-box">
	<div class="holder">
		<fieldset class="box-l">
			<legend>&nbsp;</legend>
			{attribute_view_gui attribute=$node.data_map.elite_txt}
		</fieldset>
		<fieldset class="box-r">
			<legend>List events</legend>
			<div class="input">
				<label>{$node.data_map.event_1.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.event_1}
			</div>
			<div class="input">
				<label>{$node.data_map.event_2.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.event_2}
			</div>
			<div class="input">
				<label>{$node.data_map.event_3.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.event_3}
			</div>
			<div class="input input-extra">
				<label>{$node.data_map.extraordinary_results.contentclass_attribute.name|wash}</label>
				{attribute_view_gui attribute=$node.data_map.extraordinary_results}
				<p>{$node.data_map.extraordinary_results.contentclass_attribute.description|wash}</p>
			</div>
		</fieldset>
	</div>
</fieldset>
<div class="input-submit">
	<input type="submit" value="Send form" name="ActionCollectInformation" />
	<span>{attribute_view_gui attribute=$node.data_map.submit_txt}</span>
</div>
</form>